#ifndef DRV_LED_H
#define DRV_LED_H


#include "ct_head.h"
#define LED_MAX_NUM     4
#define REPEAT_INFINITE 0

//
#define LED_NOT_REGISTERED 0
#define LED_REGISTERED     1


typedef enum {
    LED0 = 0,
    LED1,
    LED2,
    LED3
} LedEnum_t;

typedef enum {
    LED_OFF = 0,
    LED_ON,
    LED_TOG
} LedState_t;

typedef struct {
    ct_gpio_port_t port;
    ct_gpio_pin_t  pin;
} LedInfo_t;

typedef struct {
    ct_bool UVP;
    ct_bool UVLP;
    ct_bool OCP;
    ct_bool OTP;
    ct_bool UTP;
    ct_bool OVP;
} AlarmPara_t;

void LED_Init(void);
void LED_Test(void);

void LedRunDisp(ct_u8 *RunStep, ct_u8 *arr, ct_u8 len, ct_u8 StartPoint, ct_u16 TimeInv);
void LedChgDisp(ct_u8 BatCap, ct_u16 TimeInv);
void LedDischgDisp(ct_u8 BatCap, const AlarmPara_t *alarms, ct_u16 TimeInv);
void LedBatteryProtectionDisplay(ct_u8 BatCap, const AlarmPara_t *alarms, ct_u16 TimeInv);
#endif
